package com.ficus.road.maintain.core.model.zh;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.util.List;

/**
 * @author xiawen yang
 * @date 2022/4/13 下午2:24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MileageStatistic {

    @Id
    private String id;

    private Direct direct;

    private Road road;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Direct {
        private Integer annual;

        private Integer electronic;

        private TechStatistic techStatistic;

        private AdministrativeStatistic administrativeStatistic;

        private List<MileageBridge> mileageList;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class TechStatistic {
        private Double highway;

        private Double firstLevel;

        private Double secondLevel;

        private Double thirdLevel;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class AdministrativeStatistic {
        private Double state;

        private Double provincial;

        private Double county;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class MileageBridge {
        private String roadId;

        private String roadName;

        private String start;

        private String end;

        private Double mileage;

        private String company;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Road {
        private Integer annual;

        private Integer electronic;

        private RoadTypeStatistic roadTypeStatistic;

        private List<MileageBridge> mileageList;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class RoadTypeStatistic {
        private Double freeway;

        private Double mainRoad;

        private Double secondaryRoad;

        private Double branchRoad;
    }

}
